using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.UI;

public class ButttonEvent : MonoBehaviour
{
    public int SceneNumber=1;

    private int passLevelNumber;

    void Update()
    {
        passLevelNumber = LoadAndSave.LoadPassLevelNumber();

        if (SceneNumber <= passLevelNumber)
        {
            gameObject.GetComponent<Button>().enabled = true;
        }
        else
        {
            gameObject.GetComponent<Button>().enabled = false;
        }
    }
}
